export class HttpMethod {
    // Http method
    static GET = "GET";
    static POST = "POST";
}
export class ConnectState {
    // 服务器连接状态
    static OPEN = "OPEN";
    static CLOSED = "CLOSED";
    static ERROR = "ERROR";
    static DATA = "DATA";
}

export class ConnectType {
    //连接类型。
    static HTTP = "http";
    static SOCKET = "socket";
    static WEB_SOCKET = "web_socket";
    static LOCAL_SOCKET = 'local_socket';
    static LOCAL_HTTP = 'local_http';
    static CLOUD = 'cloud'
}

export default class NetEvent {


    static ERROR_DATA = "error_user_data";


    static SEND_START: string = 'SEND_START'
    static SEND_FINISH: string = 'SEND_FINISH'

    static UPDATE_SEND_MESSAGE_COUNT: string = 'UPDATE_SEND_MESSAGE_COUNT'

    static PUSH_DATA: string = 'PUSH_DATA'

    static SEND_DATA: string = 'SEND_DATA'

}

export enum NetCode {
    SUCCESS,
    ERROR,
}

export type ErrorInfo = { code: number, message: string }
